import Vue from 'vue'
import App from './App'
import store from './store' // store
import plugins from './plugins' // plugins

import {
	go,
	to,
	goReport,
	getToken
} from '@/utils/auth'

// import './permission' // permission
import VueClipboard from 'vue-clipboard2'
// 引入elementUI开发
// import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

import {
	Tabs,
	Tab,
	Cell,
	CellGroup,
	List,
	Tag,
	Card
} from 'vant';
import 'vant/lib/index.less';

import { Cascader, Carousel, CarouselItem } from 'element-ui';


import {
	FP,
	FX,
	zeroTwo
} from '@/utils/common.js'

Vue.prototype.FP = FP
Vue.prototype.FX = FX
Vue.prototype.zeroTwo = zeroTwo
Vue.prototype.go = go
Vue.prototype.to = to
Vue.prototype.goReport = goReport
Vue.prototype.isLogin = getToken

Vue.prototype.$bus = bus
Vue.prototype.$store = store

Vue.use(VueClipboard)
Vue.use(plugins)

Vue.use(Tab);
Vue.use(Tabs);
Vue.use(Cell);
Vue.use(CellGroup);
Vue.use(List);
Vue.use(Tag);
Vue.use(Card);
Vue.use(Cascader);
Vue.use(Carousel);
Vue.use(CarouselItem);

Vue.config.productionTip = false

App.mpType = 'app'
// 创建事件总线   就相当于创建了一个新的vue实例
const bus = new Vue()
// 把bus挂载到了Vue的原型上, 保证所有的组件都能通过 this.$bus访问到事件总线
Vue.prototype.$bus = bus

const app = new Vue({
	...App
})
app.$mount()